//
// Created by TheHun on 2021/6/17.
//

#ifndef INC_500KVLONGLINETEST_OFFLINERELAY_H
#define INC_500KVLONGLINETEST_OFFLINERELAY_H

#include <stdlib.h>
#include "dataStruct.h"
#include "common.h"

typedef struct LineRelayMetaInfo {
    void(*relayFunc)(char*, Device*, Device*, double*, double*, double*, double*); // 线路保护函数指针
    char* deviceName;
    Device* localDevice;
    Device* remoteDevice;
    char* dataFileName;
    int portCount;
    int* portSize;
    int tripSize;
} LineRelayMetaInfo;

void lineRelay(char* deviceName, Device* localDevice, Device* remoteDevice, double* time, double* port1, double* port2, double* tripSignal);
LineRelayMetaInfo* NewLineRelayMetaInfo(char* deviceName,
        Device* local,
        Device* remote,
        char* fileName,
        int portCount,
        const int* portSize,
        int tripSize);

#endif //INC_500KVLONGLINETEST_OFFLINERELAY_H
